package org.lanqiao.taru.lanqiao_demo.controller;

import org.lanqiao.taru.lanqiao_demo.common.Result;
import org.lanqiao.taru.lanqiao_demo.domain.addInfo;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import java.io.File;
import java.util.HashMap;


/**
 * @RespController = @Controller + @ResponseBody
 */


@RestController
@RequestMapping("/order")
public class OrderController {
    /**
     * 根据id查询订单
     *
     * @return
     */

    @GetMapping("/orderList/{id}")
//    @ResponseBody
    public Result orderList() {
        //TODD查询数据库
        return Result.success("11", "22");
    }

    /**
     * 新增订单
     */
    @PostMapping("/addOrder")
    public Object addOrder(@RequestBody addInfo info) {
        //TODD查询数据库
        return Result.success("添加成功", "22");

    }

}
